package com.application.chiettinhdienluc.model;

import android.content.ContentResolver;
import android.net.Uri;

import com.application.chiettinhdienluc.data.GlobalData;
import com.application.chiettinhdienluc.utils.Utils;

public class TramModel {
	public static final String TRAM_TABLE_NAME = "D_TRAM";

	/**
	 * Content type for account / sip profile
	 */
	public final static String TRAM_CONTENT_TYPE = GlobalData.BASE_DIR_TYPE + ".D_TRAM";
	/**
	 * Item type for account / sip profile
	 */
	public final static String TRAM_CONTENT_ITEM_TYPE = GlobalData.BASE_ITEM_TYPE + ".D_TRAM";

	public final static Uri TRAM_ID_URI_BASE = Uri.parse(ContentResolver.SCHEME_CONTENT + "://" + GlobalData.AUTHORITY + "/" + TRAM_TABLE_NAME + "/");

	public static final String FIELD_TRAM_ID = "id";
	
	public static final String FIELD_MA_DVIQLY = "MA_DVIQLY";
	public static final String FIELD_MA_TRAM = "MA_TRAM";
	public static final String FIELD_TEN_TRAM = "TEN_TRAM";
	public static final String FIELD_DINH_DANH = "DINH_DANH";
	public static final String FIELD_LOAI_TRAM = "LOAI_TRAM";
	public static final String FIELD_CSUAT_TRAM = "CSUAT_TRAM";
	public static final String FIELD_MA_CAPDA = "MA_CAPDA";
	public static final String FIELD_MA_CAPDA_RA = "MA_CAPDA_RA";
	public static final String FIELD_MA_TO = "MA_TO";
	public static final String FIELD_TINHTRANG = "TINH_TRANG";
	public static final String FIELD_HS_PHU = "HS_PHU";
	
	public final static String[] TRAM_FULL_PROJECTION = 
		{ 
			TramModel.FIELD_MA_DVIQLY, 
			TramModel.FIELD_MA_TRAM, 
			TramModel.FIELD_TEN_TRAM, 
			TramModel.FIELD_DINH_DANH,
			TramModel.FIELD_LOAI_TRAM,
			TramModel.FIELD_CSUAT_TRAM, 
			TramModel.FIELD_MA_CAPDA, 
			TramModel.FIELD_MA_CAPDA_RA, 
			TramModel.FIELD_MA_TO, 
			TramModel.FIELD_TINHTRANG, 
			TramModel.FIELD_HS_PHU 
		};

	// table column names
	// Empty constructor
	public TramModel() {

	}

	public TramModel(String maDv, String maTram, String tenTram, int congSuattram, String dinhDanh, String loaiTram, String maCapDA, String maCapDaRa, String maTo, int tinhTrang, int hoSophu) {
		this._MaTram = maTram;
		this._TenTram = tenTram;
		this._CongSuatTram = congSuattram;
		this._MaDonViQuanLy = maDv;
		this._DinhDanh = dinhDanh;
		this._LoaiTram = loaiTram;
		this._MaCapDA = maCapDA;
		this._MaCapDaRa = maCapDaRa;
		this._MaTo = maTo;
		this._TinhTrang = tinhTrang;
		this._HoSoPhu = hoSophu;

	}

	private String _MaDonViQuanLy="";
	private String _MaTram="";
	private String _TenTram="";
	private String _TenTram_NoSign="";
	private long  _CongSuatTram = 0;
	private String _DinhDanh="";
	private String _LoaiTram="";

	private String _MaCapDA="";
	private String _MaCapDaRa="";
	private String _MaTo="";
	private int _TinhTrang = -1;
	private int _HoSoPhu = -1;

	public String getMaDonViQuanLy() {
		return _MaDonViQuanLy;
	}

	public void setMaDonViQuanLy(String madonviquanly) {
		this._MaDonViQuanLy = madonviquanly;
	}

	public String getMaTram() {
		return _MaTram;
	}

	public void setMaTram(String maTram) {
		this._MaTram = maTram;
	}

	public String getTenTram() {
		return _TenTram;
	}

	public void setTenTram(String tenTram) {
		this._TenTram = tenTram;
		this._TenTram_NoSign = Utils.convertSignToNoSign(tenTram);
	}

	public String getDinhDanh() {
		return _DinhDanh;
	}

	public void setDinhDanh(String dinhDanh) {
		this._DinhDanh = dinhDanh;
	}

	public String getLoaiTram() {
		return _LoaiTram;
	}

	public void setLoaiTram(String loaiTram) {
		this._LoaiTram = loaiTram;
	}

	public long getCongSuatTram() {
		return _CongSuatTram;
	}

	public void setCongSuatTram(long congSuat) {
		this._CongSuatTram = congSuat;
	}

	public String getMaCapDA() {
		return _MaCapDA;
	}

	public void setMaCapDA(String maCapDA) {
		this._MaCapDA = maCapDA;
	}

	public String getMaCapDaRa() {
		return _MaCapDaRa;
	}

	public void setMaCapDaRa(String maCapDaRa) {
		this._MaCapDaRa = maCapDaRa;
	}

	public String getMaTo() {
		return _MaTo;
	}

	public void setMaTo(String maTo) {
		this._MaTo = maTo;
	}

	public int getTinhTrang() {
		return _TinhTrang;
	}

	public void setTinhTrang(int tinhTrang) {
		this._TinhTrang = tinhTrang;
	}

	public int getHoSoPhu() {
		return _HoSoPhu;
	}

	public void setHoSoPhu(int hoSoPhu) {
		this._HoSoPhu = hoSoPhu;
	}
	
	public String get_TenTram_NoSign() {
		return _TenTram_NoSign;
	}

	public void set_TenTram_NoSign(String _TenTram_NoSign) {
		this._TenTram_NoSign = _TenTram_NoSign;
	}

}
